home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / gnu-c / src / gcc-2.7.0-amiga / makefile.in < prev    next >
Makefile  |  1995-08-24  |  100KB  |  2,515 lines

  1. # Makefile for GNU C compiler.
  2. #   Copyright (C) 1987, 88, 90-94, 1995 Free Software Foundation, Inc.
  3.  
  4. #This file is part of GNU CC.
  5.  
  6. #GNU CC is free software; you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation; either version 2, or (at your option)
  9. #any later version.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with GNU CC; see the file COPYING.  If not, write to
  18. #the Free Software Foundation, 59 Temple Place - Suite 330,
  19. #Boston MA 02111-1307, USA.
  20.  
  21. # The targets for external use include:
  22. # all, doc, proto, install, install-cross, install-cross-rest,
  23. # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
  24. # stage1, stage2, stage3, stage4.
  25.  
  26. # Suppress smart makes who think they know how to automake Yacc files
  27. .y.c:
  28.  
  29. # Variables that exist for you to override.
  30. # See below for how to change them for certain systems.
  31.  
  32. # List of language subdirectories.
  33. # This is overridden by configure.
  34. SUBDIRS =
  35.  
  36. # Selection of languages to be made.
  37. # This is overridden by configure.
  38. LANGUAGES = c objective-c proto
  39.  
  40. ALLOCA =
  41. ALLOCA_FLAGS =
  42. ALLOCA_FINISH = true
  43.  
  44. # Various ways of specifying flags for compilations:  
  45. # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
  46. # BOOT_CFLAGS is the value of CFLAGS to pass
  47. # to the stage2 and stage3 compilations
  48. # XCFLAGS is used for most compilations but not when using the GCC just built.
  49. XCFLAGS =
  50. CFLAGS = -g
  51. BOOT_CFLAGS = -O $(CFLAGS)
  52. # These exists to be overridden by the x-* and t-* files, respectively.
  53. X_CFLAGS =
  54. T_CFLAGS =
  55.  
  56. X_CPPFLAGS =
  57. T_CPPFLAGS =
  58.  
  59. CC = cc
  60. BISON = bison
  61. BISONFLAGS =
  62. LEX = flex
  63. LEXFLAGS =
  64. AR = ar
  65. OLDAR_FLAGS = qc
  66. AR_FLAGS = rc
  67. SHELL = /bin/sh
  68. # on sysV, define this as cp.
  69. INSTALL = cp
  70. # These permit overriding just for certain files.
  71. INSTALL_PROGRAM = $(INSTALL)
  72. INSTALL_DATA = $(INSTALL)
  73. SYMLINK = cp
  74. # Some systems don't support hardlinks.  For this case, a simple copy
  75. # will achieve the same results for our purposes.
  76. HARDLINK = cp
  77. MAKEINFO = makeinfo
  78. TEXI2DVI = texi2dvi
  79. # For GNUmake: let us decide what gets passed to recursive makes.
  80. MAKEOVERRIDES =
  81.  
  82. # Define this as & to perform parallel make on a Sequent.
  83. # Note that this has some bugs, and it seems currently necessary 
  84. # to compile all the gen* files first by hand to avoid erroneous results.
  85. P =
  86.  
  87. # How to invoke ranlib.
  88. RANLIB = ranlib
  89. # Test to use to see whether ranlib exists on the system.
  90. RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
  91.  
  92. # Compiler to use for compiling libgcc1.a.
  93. # OLDCC should not be the GNU C compiler,
  94. # since that would compile typical libgcc1.a functions such as mulsi3
  95. # into infinite recursions.
  96. OLDCC = cc
  97.  
  98. # CFLAGS for use with OLDCC, for compiling libgcc1.a.
  99. # NOTE: -O does not work on some Unix systems!
  100. CCLIBFLAGS = -O
  101.  
  102. # Version of ar to use when compiling libgcc1.a.
  103. OLDAR = ar
  104.  
  105. # Target to use when installing include directory.  Either
  106. # install-headers-tar or install-headers-cpio or install-headers-cp
  107. INSTALL_HEADERS_DIR = install-headers-tar
  108.  
  109. # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
  110. # Usually the one we just built.
  111. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  112. XGCC = xgcc
  113. GCC_FOR_TARGET = ./$(XGCC) -B./
  114.  
  115. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  116. # It omits XCFLAGS, and specifies -B./.
  117. # It also specifies -I./include to find, e.g., stddef.h.
  118. GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include
  119.  
  120. # Special flags for compiling enquire.
  121. # We disable optimization to make floating point more reliable.
  122. ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
  123. ENQUIRE_LDFLAGS = $(LDFLAGS)
  124.  
  125. # Sed command to transform gcc to installed name.  Overwritten by configure.
  126. program_transform_name = -e s,x,x,
  127. program_transform_cross_name = -e s,^,$(target)-,
  128.  
  129. # Tools to use when building a cross-compiler.
  130. # These are used because `configure' appends `cross-make'
  131. # to the makefile when making a cross-compiler.
  132.  
  133. TARGET_TOOLPREFIX = $(tooldir)/bin/
  134. AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
  135. AR_FOR_TARGET_FLAGS = rc
  136. RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
  137. RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
  138.  
  139. # Dir to search for system headers.  Overridden by cross-make.
  140. SYSTEM_HEADER_DIR = /usr/include
  141.  
  142. # Control whether to run fixproto.
  143. STMP_FIXPROTO = stmp-fixproto
  144.  
  145. # Test to see whether <limits.h> exists in the system header files.
  146. LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
  147.  
  148. # There may be a premade insn-attrtab.c for this machine.
  149. # (You could rebuild it with genattrtab as usual, but it takes a long time.)
  150. # PREMADE_ATTRTAB is the file name of the file to use.
  151. # PREMADE_ATTRTAB_MD is the md file it corresponds to.
  152. PREMADE_ATTRTAB_MD = Makefile  # Guaranteed not to cmp equal to md.
  153. PREMADE_ATTRTAB = 
  154.  
  155. target= ... `configure' substitutes actual target name here.
  156. xmake_file= ... `configure' substitutes actual x- file name here.
  157. tmake_file= ... `configure' substitutes actual t- file name here.
  158. out_file= ... `configure' substitutes actual out file name here.
  159. out_object_file= ... `configure' substitutes actual out object file name here.
  160. md_file= ... `configure' substitutes actual md file name here.
  161. tm_file= ... `configure' substitutes actual tm file name here.
  162. build_xm_file= ... `configure' substitutes actual build xm- file name here.
  163. host_xm_file= ... `configure' substitutes actual host xm- file name here.
  164. lang_specs_files= ... `configure' substitutes actual lang spec file names here.
  165. lang_options_files= ... `configure' puts actual lang options file names here.
  166. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
  167. mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
  168.  
  169. # Directory where sources are, from where we are.
  170. srcdir = .
  171. # Common prefix for installation directories.
  172. # NOTE: This directory must exist when you start installation.
  173. prefix = /gnu
  174. # Directory in which to put localized header files. On the systems with
  175. # gcc as the native cc, `local_prefix' may not be `prefix' which is
  176. # `/usr'.
  177. # Similar considerations apply for toolkits located on non-writable storage,
  178. # such as CD-ROM, where we need a completely separate place to put local
  179. # include files.
  180. # NOTE: local_prefix *should not* default from prefix.
  181. local_prefix = /gnu
  182. # Directory in which to put host dependent programs and libraries
  183. exec_prefix = $(prefix)
  184. # Directory in which to put the executable for the command `gcc'
  185. bindir = $(exec_prefix)/bin
  186. # Directory in which to put the directories used by the compiler.
  187. libdir = $(exec_prefix)/lib
  188. # Directory in which the compiler finds executables, libraries, etc.
  189. libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
  190. # Directory in which the compiler finds g++ includes.
  191. gxx_include_dir= $(libdir)/g++-include
  192. # Directory to search for site-specific includes.
  193. includedir = $(local_prefix)/include
  194. # assertdir is overridden in cross-make.
  195. # (But this currently agrees with what is in cross-make.)
  196. assertdir = $(tooldir)/include
  197. # where the info files go
  198. infodir = $(prefix)/info
  199. # Extension (if any) to put in installed man-page filename.
  200. manext = .1
  201. objext = .o
  202. exeext =
  203.  
  204. # Directory in which to put man pages.
  205. mandir = $(prefix)/man/man1
  206. # Directory in which to find other cross-compilation tools and headers.
  207. # Used in install-cross.
  208. tooldir = $(exec_prefix)/$(target)
  209. # Dir for temp files.
  210. tmpdir = /tmp
  211.  
  212. # Additional system libraries to link with.
  213. CLIB=
  214.  
  215. # Change this to a null string if obstacks are installed in the
  216. # system library.
  217. OBSTACK=obstack.o
  218.  
  219. # Specify the rule for actually making libgcc.a,
  220. LIBGCC = libgcc.a
  221. # and the rule for installing it.
  222. INSTALL_LIBGCC = install-libgcc
  223.  
  224. # Specify the rule for actually making libgcc1.a.
  225. # The value may be empty; that means to do absolutely nothing
  226. # with or for libgcc1.a.
  227. LIBGCC1 = libgcc1.a
  228.  
  229. # Specify the rule for making libgcc1.a for a cross-compiler.
  230. # The default rule assumes that libgcc1.a is supplied by the user.
  231. CROSS_LIBGCC1 = libgcc1.cross
  232.  
  233. # Specify the rule for actually making libgcc2.a.
  234. LIBGCC2 = libgcc2.a
  235.  
  236. # Options to use when compiling libgcc2.a.
  237. # -g1 causes output of debug info only for file-scope entities.
  238. # we use this here because that should be enough, and also
  239. # so that -g1 will be tested.
  240. LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1
  241.  
  242. # Additional options to use when compiling libgcc2.a.
  243. # Some targets override this to -Iinclude
  244. LIBGCC2_INCLUDES =
  245.  
  246. # Things which must be built before building libgcc2.a.
  247. # Some targets override this to stmp-int-hdrs
  248. LIBGCC2_DEPS =
  249.  
  250. # Enquire target (This is a variable so that a target can choose not to
  251. # build it.)
  252. ENQUIRE = enquire
  253.  
  254. # libgcc1-test target (must also be overridable for a target)
  255. LIBGCC1_TEST = libgcc1-test
  256.  
  257. # List of extra executables that should be compiled for this target machine
  258. # that are used for compiling from source code to object code.
  259. # The rules for compiling them should be in the t-* file for the machine.
  260. EXTRA_PASSES =
  261.  
  262. # Like EXTRA_PASSES, but these are used when linking.
  263. EXTRA_PROGRAMS = 
  264.  
  265. # List of extra object files that should be compiled for this target machine.
  266. # The rules for compiling them should be in the t-* file for the machine.
  267. EXTRA_PARTS =
  268.  
  269. # List of extra object files that should be compiled and linked with
  270. # compiler proper (cc1, cc1obj, cc1plus).
  271. EXTRA_OBJS =
  272.  
  273. # List of additional header files to install.
  274. # Often this is edited directly by `configure'.
  275. EXTRA_HEADERS =
  276.  
  277. # Set this to `ld' to enable use of collect2.
  278. # USE_COLLECT2 =
  279. # It is convenient for configure to add the assignment at the beginning,
  280. # so don't override it here.
  281.  
  282. # List of extra C and assembler files to add to libgcc1.a.
  283. # Assembler files should have names ending in `.asm'.
  284. LIB1FUNCS_EXTRA = 
  285.  
  286. # List of extra C and assembler files to add to libgcc2.a.
  287. # Assembler files should have names ending in `.asm'.
  288. LIB2FUNCS_EXTRA = 
  289.  
  290. # Default float.h source to use for cross-compiler.
  291. CROSS_FLOAT_H=float.h-cross
  292.  
  293. # Program to convert libraries.
  294. LIBCONVERT = 
  295.  
  296. # Control whether header files are installed.
  297. INSTALL_HEADERS=install-headers
  298.  
  299. # Options for tar when copying trees.  So HPUX can override it.
  300. TAROUTOPTS = xpBf
  301.  
  302. # Select which version of fixincludes to use (I.E. regular versus SVR4)
  303. # This value is overridden directly by configure.
  304. FIXINCLUDES=fixincludes
  305.  
  306. # Additional directories of header files to run fixincludes on.
  307. # These should be directories searched automatically by default
  308. # just as /usr/include is.
  309. # *Do not* use this for directories that happen to contain 
  310. # header files, but are not searched automatically by default.
  311. # On most systems, this is empty.
  312. OTHER_FIXINCLUDES_DIRS=
  313.  
  314. # List of things which should already be built whenever we try to use xgcc
  315. # to compile anything (without linking).
  316. GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
  317.  
  318. # List of things which should already be built whenever we try to use xgcc
  319. # to link anything.
  320. GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  321.  
  322. # Directory to link to, when using the target `maketest'.
  323. DIR = ../gcc
  324.  
  325. # Guaranteed to not exist when not passing md through cpp.
  326. # This value is overridden directly by configure.
  327. MD_FILE = md-cpp-not-used
  328.  
  329. # Flags to use when cross-building GCC.
  330. # Prefix to apply to names of object files when using them
  331. # to run on the machine we are compiling on.
  332. HOST_PREFIX=
  333. # Prefix to apply to names of object files when compiling them
  334. # to run on the machine we are compiling on.
  335. # The default for this variable is chosen to keep these rules 
  336. # out of the way of the other rules for compiling the same source files.
  337. HOST_PREFIX_1=loser-
  338. HOST_CC=$(CC)
  339. HOST_CFLAGS=$(ALL_CFLAGS)
  340. HOST_CLIB=$(CLIB)
  341. HOST_LDFLAGS=$(LDFLAGS)
  342. HOST_CPPFLAGS=$(ALL_CPPFLAGS)
  343. HOST_ALLOCA=$(ALLOCA)
  344. HOST_MALLOC=$(MALLOC)
  345. HOST_OBSTACK=$(OBSTACK)
  346.  
  347. # Actual name to use when installing a native compiler.
  348. GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
  349.  
  350. # Actual name to use when installing a cross-compiler.
  351. GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
  352.  
  353. # Choose the real default target.
  354. ALL=all.internal
  355.  
  356. # Choose the real install target.
  357. INSTALL_TARGET=install-normal
  358.  
  359. # Source for float.h.  Overridden by cross-make.
  360. FLOAT_H=float.h-nat
  361.  
  362. # Extra symbols for fixproto to define when parsing headers.
  363. FIXPROTO_DEFINES = 
  364.  
  365. # Extra flags to use when compiling crt{begin,end}.o.
  366. CRTSTUFF_T_CFLAGS = 
  367.  
  368. # End of variables for you to override.
  369.  
  370. # Definition of `all' is here so that new rules inserted by sed
  371. # do not specify the default target.
  372. # The real definition is under `all.internal' (for native compilers)
  373. # or `all.cross' (for cross compilers).
  374. all: all.indirect
  375.  
  376. # This tells GNU Make version 3 not to put all variables in the environment.
  377. .NOEXPORT:
  378.  
  379. # sed inserts variable overrides after the following line.
  380. ####target overrides
  381. ####host overrides
  382. ####cross overrides
  383. ####build overrides
  384.  
  385. # Now figure out from those variables how to compile and link.
  386.  
  387. all.indirect: $(ALL)
  388.  
  389. # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
  390. # ??? IN_GCC should be obsolete now.
  391. INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
  392.  
  393. # This is the variable actually used when we compile.
  394. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
  395.  
  396. # Likewise.
  397. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
  398.  
  399. # Even if ALLOCA is set, don't use it if compiling with GCC.
  400. USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
  401. USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
  402. USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
  403. USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
  404.  
  405. # Dependency on obstack, alloca, malloc or whatever library facilities
  406. # are not installed in the system libraries.
  407. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  408. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  409.  
  410. # Likewise, for use in the tools that must run on this machine
  411. # even if we are cross-building GCC.
  412. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  413. HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
  414.  
  415. # How to link with both our special library facilities
  416. # and the system's installed libraries.
  417. LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
  418.  
  419. # Likewise, for use in the tools that must run on this machine
  420. # even if we are cross-building GCC.
  421. HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
  422.         $(HOST_CLIB)
  423.  
  424. HOST_RTL = $(HOST_PREFIX)rtl.o
  425. HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
  426. HOST_PRINT = $(HOST_PREFIX)print-rtl.o
  427.  
  428. # Specify the directories to be searched for header files.
  429. # Both . and srcdir are used, in that order,
  430. # so that tm.h and config.h will be found in the compilation
  431. # subdirectory rather than in the source directory.
  432. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  433.  
  434. # Always use -I$(srcdir)/config when compiling.
  435. .c.o:
  436.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  437.  
  438. # This tells GNU make version 3 not to export all the variables
  439. # defined in this file into the environment.
  440. .NOEXPORT:
  441.  
  442. # Support for additional languages (other than c and objc).
  443. # ??? objc can be supported this way too (leave for later).
  444.  
  445. # These next lines are overridden by configure.
  446. LANG_MAKEFILES =
  447. LANG_STAGESTUFF =
  448. LANG_DIFF_EXCLUDES =
  449.  
  450. # Flags to pass to recursive makes.
  451. # CC is set by configure.  Hosts without symlinks need special handling
  452. # because we need CC="stage1/xgcc -Bstage1/" to work in the language
  453. # subdirectories.
  454. # ??? The choices here will need some experimenting with.
  455. FLAGS_TO_PASS = \
  456.     "AR_FLAGS=$(AR_FLAGS)" \
  457.     "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  458.     "BISON=$(BISON)" \
  459.     "BISONFLAGS=$(BISONFLAGS)" \
  460.     "CC=set-by-configure" \
  461.     "CFLAGS=$(CFLAGS)" \
  462.     "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
  463.     "LDFLAGS=$(LDFLAGS)" \
  464.     "LEX=$(LEX)" \
  465.     "LEXFLAGS=$(LEXFLAGS)" \
  466.     "MAKEINFO=$(MAKEINFO)" \
  467.     "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
  468.     "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  469.     "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
  470.     "SHELL=$(SHELL)" \
  471.     "exeext=$(exeext)" \
  472.     "objext=$(objext)" \
  473.     "exec_prefix=$(exec_prefix)" \
  474.     "prefix=$(prefix)" \
  475.     "tooldir=$(tooldir)" \
  476.     "bindir=$(bindir)" \
  477.     "libsubdir=$(libsubdir)"
  478.  
  479. # Lists of files for various purposes.
  480.  
  481. # A list of all the language-specific executables.
  482. # This is overridden by configure.
  483. COMPILERS = cc1$(exeext) cc1obj$(exeext)
  484.  
  485. # Language-specific object files for C.
  486. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  487.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  488.  
  489. # Language-specific object files for Objective C.
  490. OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
  491.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  492.  
  493. # Files specific to the C interpreter bytecode compiler(s).
  494. BC_OBJS = bc-emit.o bc-optab.o
  495.  
  496. # Bytecode header files constructed at build time; vmsconfig.com wants this.
  497. BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
  498.  
  499. # Language-independent object files.
  500. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  501.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  502.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  503.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  504.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  505.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  506.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  507.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  508.  insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
  509.  
  510. # GEN files are listed separately, so they can be built before doing parallel
  511. #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
  512. #  them before rtl.o is compiled.
  513. GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
  514.  
  515. CCCP=cccp
  516. # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
  517. #CCCP=cppmain
  518.  
  519. # Files to be copied away after each stage in building.
  520. STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
  521.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  522.  insn-attr.h insn-attrtab.c insn-opinit.c \
  523.  stamp-flags stamp-config stamp-codes \
  524.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  525.  stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  526.  genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
  527.  genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
  528.  genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
  529.  $(BC_ALL) \
  530.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  531.  bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
  532.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
  533.  $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
  534.  protoize$(exeext) unprotoize$(exeext) \
  535.  specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
  536.  *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
  537.  *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
  538.  *.[si] \
  539.  $(LANG_STAGESTUFF)
  540.  
  541. # Members of libgcc1.a.
  542. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
  543.    _lshrsi3 _ashrsi3 _ashlsi3 \
  544.    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
  545.    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
  546.    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
  547.    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
  548.    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
  549.  
  550. # Library members defined in libgcc2.c.
  551. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
  552.      _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
  553.     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
  554.     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
  555.     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
  556.     _fixtfdi _fixunstfdi _floatditf \
  557.     __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
  558.     _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
  559.     _pure
  560.  
  561. # Header files that are made available under the same name
  562. # to programs compiled with GCC.
  563. USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
  564.     $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
  565.     $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
  566.     $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
  567.     $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
  568.     $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
  569.     $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
  570.     $(srcdir)/ginclude/iso646.h \
  571.     $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS)
  572.  
  573. # The files that "belong" in CONFIG_H are deliberately omitted
  574. # because having them there would not be useful in actual practice.
  575. # All they would do is cause complete recompilation every time
  576. # one of the machine description files is edited.
  577. # That may or may not be what one wants to do.
  578. # If it is, rm *.o is an easy way to do it.
  579. # CONFIG_H = $(host_xm_file) $(tm_file)
  580. CONFIG_H =
  581. RTL_H = rtl.h rtl.def machmode.h machmode.def
  582. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  583. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  584.  
  585. # Language makefile fragments.
  586.  
  587. # The following targets define the interface between us and the languages.
  588. #
  589. # all.build, all.cross, start.encap, rest.encap,
  590. # info, dvi,
  591. # install-normal, install-common, install-info, install-man,
  592. # uninstall, distdir,
  593. # mostlyclean, clean, distclean, extraclean, maintainer-clean,
  594. # stage1, stage2, stage3, stage4
  595. #
  596. # Each language is linked in with a series of hooks (since we can't use `::'
  597. # targets).  The name of each hooked is "lang.${target_name}" (eg: lang.info).
  598. # Configure computes and adds these here.
  599.  
  600. ####language hooks
  601.  
  602. # sed inserts language fragments after the following line.
  603. ####language fragments
  604.  
  605. # End of language makefile fragments.
  606.  
  607. # Avoid a lot of time thinking about remaking Makefile.in and *.def.
  608. .SUFFIXES: .in .def
  609.  
  610. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
  611.    $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \
  612.    $(LANG_MAKEFILES)
  613.     cp config.status config.run
  614.     $(SHELL) config.run
  615.     rm -f config.run
  616.  
  617. all.internal: start.encap rest.encap
  618. # This is what to compile if making a cross-compiler.
  619. # Note that we can compile enquire using the cross-compiler just built,
  620. # although we can't run it on this machine.
  621. all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
  622.     $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
  623. # This is what to compile if making gcc with a cross-compiler.
  624. all.build: native xgcc $(EXTRA_PARTS) lang.all.build
  625. # This is what must be made before installing GCC and converting libraries.
  626. start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
  627. # These can't be made until after GCC can run.
  628. rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
  629. # This is what is made with the host's compiler
  630. # whether making a cross compiler or not.
  631. native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
  632.  
  633. # Define the names for selecting languages in LANGUAGES.
  634. C c: cc1
  635. OBJC objc: cc1obj objc-runtime
  636. OBJECTIVE-C objective-c: cc1obj objc-runtime
  637. PROTO: proto
  638.  
  639. # Tell GNU make these are phony targets.
  640. .PHONY: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
  641.  
  642. # Really, really stupid make features, such as SUN's KEEP_STATE, may force
  643. # a target to build even if it is up-to-date.  So we must verify that
  644. # config.status does not exist before failing.
  645. config.status:
  646.     @if [ ! -f config.status ] ; then \
  647.       echo You must configure gcc.  Look at the INSTALL file for details.; \
  648.       false; \
  649.     else \
  650.       true; \
  651.     fi
  652.  
  653. # On the target machine, finish building a cross compiler.
  654. # This does the things that can't be done on the host machine.
  655. rest.cross: $(LIBGCC) gfloat.h specs
  656.  
  657. # Verify that it works to compile and link libgcc1-test.
  658. # If it does, then there are sufficient replacements for libgcc1.a.
  659. libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
  660.     @echo "Testing libgcc1.  Ignore linker warning messages."
  661.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
  662.       -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
  663. libgcc1-test.o: libgcc1-test.c native xgcc
  664.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
  665.  
  666. # Recompile all the language-independent object files.
  667. # This is used only if the user explicitly asks for it.
  668. compilations: ${OBJS}
  669.  
  670. # Create a list of the language-independent object files so the language
  671. # subdirectories needn't mention their names explicitly.
  672. stamp-objlist: Makefile $(OBJS) $(BC_OBJS)
  673.     echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z]\), ../\1,g' >stamp-objlist
  674.  
  675. # We call this executable `xgcc' rather than `gcc'
  676. # to avoid confusion if the current directory is in the path
  677. # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
  678. xgcc: gcc.o version.o $(LIBDEPS)
  679.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o $(LIBS)
  680.  
  681. # Dump a specs file to make -B./ read these specs over installed ones.
  682. specs: xgcc$(exeext) xgccv$(exeext)
  683.     $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
  684.     mv tmp-specs specs
  685.  
  686. # We do want to create an executable named `xgcc', so we can use it to
  687. # compile libgcc2.a.
  688. # Also create gcc-cross, so that install-common will install properly.
  689. gcc-cross: xgcc
  690.     cp xgcc$(exeext) gcc-cross$(exeext)
  691.  
  692. cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  693.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  694.  
  695. cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  696.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  697.  
  698. # Copy float.h from its source.
  699. gfloat.h: $(FLOAT_H)
  700.     cp $(FLOAT_H) gfloat.h
  701.  
  702. # Create float.h source for the native machine.
  703. float.h-nat: enquire
  704.     -./enquire -f > tmp-float.h
  705.     mv tmp-float.h float.h-nat
  706.  
  707. # Create a dummy float.h source for a cross-compiler.
  708. float.h-cross:
  709.     echo "#error float.h values not known for cross-compiler" > t-float.h-cross
  710.     mv t-float.h-cross float.h-cross
  711.  
  712. # Used to compile enquire with standard cc, but have forgotten why.
  713. # Let's try with GCC.
  714. enquire: enquire.o $(GCC_PARTS)
  715.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
  716. enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
  717. # Breaking this line caused a problem with one version of GNU make.
  718.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
  719.  
  720. # Build the version of limits.h that we will install.
  721. xlimits.h: glimits.h limitx.h limity.h
  722.     if $(LIMITS_H_TEST) ; then \
  723.       cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
  724.     else \
  725.       cat $(srcdir)/glimits.h > tmp-xlimits.h; \
  726.     fi
  727.     mv tmp-xlimits.h xlimits.h
  728.  
  729. # Build libgcc.a.
  730. # This is done in two parts because some functions, in libgcc1.c,
  731. # must be compiled with something other than GCC,
  732. # while the rest, in libgcc2.c, must be compiled with xgcc.
  733. # That means we can't do libgcc2.c until after xgcc, cc1, etc.
  734.  
  735. # Use this as value of LIBGCC1 to cause conversion to GNU library format.
  736. # LIBCONVERT should put its output in libgcc1.conv.
  737. libgcc1.conv: libgcc1.a
  738.     $(LIBCONVERT) libgcc1.a libgcc1.conv
  739.  
  740. # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
  741. # Make an empty file instead.
  742. libgcc1.null: $(GCC_PASSES)
  743.     echo "__foo () {}" > dummy.c
  744.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
  745.     $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
  746.     rm -f dummy$(objext) dummy.c
  747.  
  748. # This is $(LIBGCC1) for a cross-compiler.
  749. # We have no automatic way of building libgcc1.a, 
  750. # so it's up to the installer to find a way to do that.
  751. # This rule deliberately does not depend on libgcc1.a
  752. # so that it will fail if the installer hasn't provided it.
  753. libgcc1.cross:
  754.     mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
  755.  
  756. # Compile the library of arithmetic subroutines with the native compiler.
  757. # Don't compile it with GCC!
  758. # (That would cause most arithmetic functions to call themselves.)
  759. libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
  760.     -rm -f tmplibgcc1.a
  761. # Actually build it in tmplibgcc1.a, then rename at end,
  762. # so that libgcc1.a itself remains nonexistent if compilation is aborted.
  763. # -e causes any failing command to make this rule fail.
  764. # -e doesn't work in certain shells, so we test $$? as well.
  765. # lynx has a broken ar, it always complains when the initial library is
  766. # empty, thus this command works only if we don't do -e
  767. # There is a trailing backslash (\) deleted from the following line.
  768. #    set -e;
  769.     for name in $(LIB1FUNCS); \
  770.     do \
  771.       echo $${name}; \
  772.       rm -f $${name}$(objext); \
  773.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
  774.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  775.       mv libgcc1$(objext) $${name}$(objext); \
  776.       $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  777.       rm -f $${name}$(objext); \
  778.     done
  779. # Some shells crash when a loop has no items.
  780. # So make sure there is always at least one--`..'.
  781. # Then ignore it.
  782. # We don't use -e here because there are if statements
  783. # that should not make the command give up when the if condition is false.
  784. # Instead, we test for failure after each command where it matters.
  785.     for file in .. $(LIB1FUNCS_EXTRA); \
  786.     do \
  787.       if [ x$${file} != x.. ]; then \
  788.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  789.         echo $${name}; \
  790.         if [ $${name}.asm = $${file} ]; then \
  791.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  792.         else true; fi; \
  793.         $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
  794.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  795.         $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  796.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  797.         rm -f $${name}.s $${name}$(objext); \
  798.       else true; \
  799.       fi; \
  800.     done
  801.     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
  802.     mv tmplibgcc1.a libgcc1.a
  803.  
  804. # Build libgcc1.a from assembler source.  LIB1ASMFUNCS is the list of
  805. # functions.  LIB1ASMSRC is the name of the source file in the config
  806. # subdirectory.
  807. libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
  808.     -rm -f tmplibgcc1.a libgcc1.S
  809.     cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
  810. # Actually build it in tmplibgcc1.a, then rename at end,
  811. # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
  812. # -e causes any failing command to make this rule fail.
  813. # -e doesn't work in certain shells, so we test $$? as well.
  814. # lynx has a broken ar, it always complains when the initial library is
  815. # empty, thus this command works only if we don't do -e
  816. # There is a trailing backslash (\) deleted from the following line.
  817. #    set -e;
  818.     for name in $(LIB1ASMFUNCS); \
  819.     do \
  820.       echo $${name}; \
  821.       $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
  822.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  823.       mv libgcc1$(objext) $${name}$(objext); \
  824.       $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  825.       rm -f $${name}$(objext); \
  826.     done
  827.     -rm -f libgcc1.S
  828.     mv tmplibgcc1.a libgcc1-asm.a
  829.  
  830. # Generate assembly versions of the functions required for libgcc1.
  831. # You'll still need to massage the code by hand (possibly hacking
  832. # underscores and local labels) but this will get you started.
  833. libgcc1.S: libgcc1.c $(CONFIG_H) config.status
  834.     -rm -f libgcc1.S
  835.     touch libgcc1.S
  836.     for name in $(LIB1FUNCS); \
  837.     do \
  838.       echo $${name}; \
  839.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
  840.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  841.       echo '#ifdef ' L$${name} >> libgcc1.S; \
  842.       cat  libgcc1.s >> libgcc1.S; \
  843.       echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
  844.       echo "" >> libgcc1.S; \
  845.     done
  846.  
  847. # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
  848. # But recompiling cc1 should not force recompilation of libgcc2.a.
  849. # If you want to force recompilation, delete libgcc2.a.
  850. libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
  851.     -if [ -f libgcc2.ready ] ; then \
  852.         true; \
  853.     else \
  854.         touch libgcc2.ready; \
  855.     fi
  856.  
  857. libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
  858.    machmode.h longlong.h gbl-ctors.h config.status
  859. # Actually build it in tmplibgcc2.a, then rename at end,
  860. # so that libgcc2.a itself remains nonexistent if compilation is aborted.
  861.     -rm -f tmplibgcc2.a
  862. # -e causes any failing command to make this rule fail.
  863. # -e doesn't work in certain shells, so we test $$? as well.
  864. # lynx has a broken ar, it always complains when the initial library is
  865. # empty, thus this command works only if we don't do -e
  866. # There is a trailing backslash (\) deleted from the following line.
  867. #    set -e;
  868.     for name in $(LIB2FUNCS); \
  869.     do \
  870.       echo $${name}; \
  871.       $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  872.           $(srcdir)/libgcc2.c -o $${name}$(objext); \
  873.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  874.       $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
  875.       rm -f $${name}$(objext); \
  876.     done
  877. # Some shells crash when a loop has no items.
  878. # So make sure there is always at least one--`..'.
  879. # Then ignore it.
  880. # We don't use -e here because there are if statements
  881. # that should not make the command give up when the if condition is false.
  882. # Instead, we test for failure after each command where it matters.
  883.     for file in .. $(LIB2FUNCS_EXTRA); \
  884.     do \
  885.       if [ x$${file} != x.. ]; then \
  886.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  887.         oname=` echo $${name} | sed -e 's,.*/,,'`; \
  888.         echo $${name}; \
  889.         if [ $${name}.asm = $${file} ]; then \
  890.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  891.         else true; fi; \
  892.         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  893.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  894.         $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
  895.         rm -f $${name}.s $${oname}$(objext); \
  896.       else true; \
  897.       fi; \
  898.     done
  899.     mv tmplibgcc2.a libgcc2.a
  900. # These lines were deleted from above the mv command
  901. # because ranlibing libgcc.a itself should suffice.
  902. #    -if [ x${HPUX_GAS} = x ] ; then \
  903. #      if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
  904. #    else true; fi
  905.  
  906. # Combine the various libraries into a single library, libgcc.a.
  907. libgcc.a: $(LIBGCC1) $(LIBGCC2)
  908.     -rm -rf tmplibgcc.a libgcc.a tmpcopy
  909.     mkdir tmpcopy
  910.     -if [ x$(LIBGCC1) != x ];            \
  911.     then (cd tmpcopy; $(AR) x ../$(LIBGCC1));    \
  912.     else true;                    \
  913.     fi
  914. # Some versions of ar (specifically the one in RISC/os 5.x), create an
  915. # unwritable table of contents file, and then print an error message when
  916. # the second ar command tries to overwrite this file.  To avoid the error
  917. # message from ar, we make sure all files are writable.
  918.     -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  919. # The "cd..; wait" makes sure that the lock on tmpcopy has time to disappear.
  920.     (cd tmpcopy; $(AR) x ../$(LIBGCC2); cd ..; /c/wait 2)
  921.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext); cd ..; /c/wait 2)
  922.     rm -rf tmpcopy
  923.     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  924. # Actually build it in tmplibgcc.a, then rename at end,
  925. # so that libgcc.a itself remains nonexistent if compilation is aborted.
  926.     mv tmplibgcc.a libgcc.a
  927.  
  928. # Use the genmultilib shell script to generate the information the gcc
  929. # driver program needs to select the library directory based on the
  930. # switches.
  931. multilib.h: $(srcdir)/genmultilib Makefile
  932.     $(SHELL) $(srcdir)/genmultilib "$(MULTILIB_OPTIONS)" \
  933.       "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h
  934.  
  935. # Build multiple copies of libgcc.a, one for each target switch.
  936. stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
  937.    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  938.     for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
  939.       dir=`echo $$i | sed -e 's/;.*$$//'`; \
  940.       flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
  941.       $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
  942.         AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
  943.         RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
  944.         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
  945.         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
  946.         LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
  947.         dir="$${dir}" stmp-multilib-sub; \
  948.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  949.     done
  950.     touch stmp-multilib
  951.  
  952. # Subroutine of stmp-multilib so make -n works.
  953. stmp-multilib-sub:
  954.     rm -f $(dir)/libgcc.a $(LIBGCC2)
  955.     $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
  956.       AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
  957.       HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
  958.       LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
  959.     if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
  960.     then true; \
  961.     else rm -f $(LIBGCC1); \
  962.     fi
  963.     if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
  964.     then true; \
  965.     else \
  966.       $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
  967.         AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
  968.         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
  969.         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
  970.     fi
  971.     rm -rf tmplibgcc.a tmpcopy
  972.     mkdir tmpcopy
  973.     if [ x$(LIBGCC1) != x ]; \
  974.     then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
  975.     else true; \
  976.     fi
  977.     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  978.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
  979.     rm -rf libgcc2.a tmpcopy
  980.     if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  981.     if [ -d $(dir) ]; then true; else mkdir $(dir); fi
  982.     mv tmplibgcc.a $(dir)/libgcc.a
  983.  
  984. objc-runtime: libobjc.a
  985.  
  986. # Build the Objective C runtime library.
  987. libobjc.a: cc1obj stmp-int-hdrs libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
  988.     if [ -d objc ]; then true; else mkdir objc; fi
  989.     thisdir1=`pwd`; \
  990.     srcdir1=`cd $(srcdir); pwd`; \
  991.     cd objc; \
  992.     $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  993.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  994.       GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  995.       GCC_CFLAGS="$(GCC_CFLAGS)"
  996.     -rm -f libobjc.a
  997.     $(HARDLINK) objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  998.     -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  999.  
  1000. # This is used by objc/Makefile if the user runs that directly.
  1001. sublibobjc.a: cc1obj stmp-int-hdrs libgcc2.ready
  1002.     thisdir1=`pwd`; \
  1003.     srcdir1=`cd $(srcdir); pwd`; \
  1004.     cd objc; \
  1005.     $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  1006.       srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1007.       GCC_FOR_TARGET="$$thisdir1/$(XGCC) -B$$thisdir1/" \
  1008.       GCC_CFLAGS="$(GCC_CFLAGS)"
  1009.  
  1010. # Compile two additional files that are linked with every program
  1011. # linked using GCC on system V, for the sake of C++ constructors.
  1012. crtbegin.o:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  1013.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
  1014.       -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
  1015.       -g0 -c $(srcdir)/crtstuff.c
  1016.     mv crtstuff$(objext) $@
  1017.  
  1018. crtend.o:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  1019.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
  1020.       -DCRT_END -finhibit-size-directive -fno-inline-functions \
  1021.       -g0 -c $(srcdir)/crtstuff.c
  1022.     mv crtstuff$(objext) $@
  1023.  
  1024. # Compiling object files from source files.
  1025.  
  1026. # Note that dependencies on obstack.h are not written
  1027. # because that file is not part of GCC.
  1028.  
  1029. # C language specific files.
  1030.  
  1031. c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  1032.     $(srcdir)/c-parse.h c-tree.h input.h flags.h
  1033.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
  1034. $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
  1035. $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
  1036.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  1037. $(srcdir)/c-parse.y: c-parse.in
  1038.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  1039.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  1040.       $(srcdir)/c-parse.in >tmp-c-parse.y
  1041.     $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
  1042.  
  1043. $(srcdir)/c-gperf.h: c-parse.gperf
  1044.     gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
  1045.        $(srcdir)/c-parse.gperf >tmp-gperf.h
  1046.      $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
  1047.  
  1048. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
  1049. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
  1050. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  1051. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
  1052.     input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
  1053. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  1054. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  1055. c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) c-pragma.h
  1056. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  1057.  
  1058. # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  1059. ld: collect2
  1060.     rm -f ld$(exeext)
  1061.     $(HARDLINK) collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
  1062.        || cp collect2$(exeext) ld$(exeext)
  1063.  
  1064. collect2 : collect2.o cplus-dem.o underscore.o version.o $(LIBDEPS)
  1065. # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  1066.     -rm -f collect2$(exeext)
  1067.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o \
  1068.       cplus-dem.o underscore.o version.o $(LIBS)
  1069.  
  1070. collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
  1071.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
  1072.     -DTARGET_MACHINE=\"$(target)\" $(MAYBE_USE_COLLECT2) \
  1073.     -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
  1074.  
  1075. cplus-dem.o: cplus-dem.c demangle.h
  1076.  
  1077. underscore.c: $(GCC_PASSES)
  1078.     echo "int xxy_us_dummy;" >tmp-dum.c
  1079.     $(GCC_FOR_TARGET) -S tmp-dum.c
  1080.     echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
  1081.     if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
  1082.       echo "int prepends_underscore = 1;" >>tmp-under.c; \
  1083.     else \
  1084.       echo "int prepends_underscore = 0;" >>tmp-under.c; \
  1085.     fi
  1086.     $(srcdir)/move-if-change tmp-under.c underscore.c
  1087.     -rm -f tmp-dum.c tmp-dum.s
  1088.  
  1089. # Objective C language specific files.
  1090.  
  1091. objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  1092.    c-tree.h input.h flags.h objc-act.h
  1093.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
  1094. $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
  1095.     cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  1096. $(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
  1097.     sed -e "/^ifc$$/,/^end ifc$$/d" \
  1098.       -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
  1099.       $(srcdir)/c-parse.in >tmp-objc-prs.y
  1100.     $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc-parse.y
  1101.  
  1102. objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
  1103.    flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
  1104.  
  1105. # A file used by all variants of C.
  1106.  
  1107. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  1108.  
  1109. # Language-independent files.
  1110.  
  1111. gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
  1112.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1113.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  1114.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  1115.   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  1116.   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  1117.   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  1118.   $(MAYBE_TARGET_DEFAULT) \
  1119.   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
  1120.  
  1121. dumpvers: dumpvers.c
  1122.  
  1123. version.o: version.c
  1124. obstack.o: obstack.c
  1125.  
  1126. convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
  1127.  
  1128. tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
  1129. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  1130. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
  1131. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  1132. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
  1133.    flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
  1134.    $(lang_options_files)
  1135.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1136.       $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
  1137.       -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
  1138.  
  1139. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  1140.  
  1141. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  1142. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  1143.  
  1144. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
  1145.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
  1146.    output.h bytecode.h c-pragma.h
  1147. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1148.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  1149.    recog.h output.h bytecode.h
  1150. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1151.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  1152.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  1153.    bc-emit.h
  1154. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
  1155.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  1156.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  1157.    bc-emit.h modemap.def
  1158. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  1159.    insn-flags.h
  1160. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  1161.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  1162. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  1163.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  1164. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  1165.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
  1166. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  1167.    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
  1168. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  1169.    insn-config.h reload.h
  1170. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  1171.    insn-config.h reload.h output.h defaults.h
  1172. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  1173. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
  1174.    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
  1175.    bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  1176. real.o : real.c $(CONFIG_H) $(TREE_H)
  1177. getpwd.o : getpwd.c $(CONFIG_H)
  1178.  
  1179. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  1180.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  1181.    bytecode.h
  1182.  
  1183. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  1184.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  1185. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  1186.  
  1187. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  1188.    insn-config.h recog.h
  1189. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  1190.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  1191. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  1192.    integrate.h regs.h flags.h expr.h loop.h
  1193. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  1194.    basic-block.h regs.h hard-reg-set.h output.h
  1195. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  1196.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  1197.    basic-block.h recog.h real.h hard-reg-set.h
  1198. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  1199.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  1200. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  1201.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  1202. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  1203.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  1204.  
  1205. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  1206.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  1207. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  1208.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  1209.    basic-block.h recog.h output.h
  1210. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  1211.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  1212. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  1213.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  1214.    flags.h output.h
  1215. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  1216.    flags.h insn-config.h insn-attr.h
  1217. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
  1218.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  1219.    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
  1220. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  1221.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  1222.    insn-flags.h insn-codes.h real.h
  1223. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  1224.    regs.h hard-reg-set.h flags.h insn-config.h
  1225.  
  1226. $(out_object_file): $(out_file) $(CONFIG_H) \
  1227.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  1228.    insn-flags.h output.h insn-attr.h insn-codes.h
  1229.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
  1230.  
  1231. # Build auxiliary files that support ecoff format.
  1232. mips-tfile: mips-tfile.o version.o $(LIBDEPS)
  1233.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
  1234.  
  1235. mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
  1236.  
  1237. mips-tdump: mips-tdump.o version.o $(LIBDEPS)
  1238.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
  1239.  
  1240. mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
  1241.  
  1242. # Build file to support OSF/rose half-pic format.
  1243. halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
  1244.  
  1245. # Normally this target is not used; but it is used if you
  1246. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  1247. # from the GNU Emacs distribution.
  1248. alloca.o:    alloca.c
  1249.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
  1250.       -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
  1251.     $(ALLOCA_FINISH)
  1252.  
  1253. # Generate header and source files from the machine description, 
  1254. # and compile them.
  1255.  
  1256. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  1257.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  1258.   insn-attr.h insn-attrtab.c
  1259.  
  1260. # The following pair of rules has this effect:
  1261. # genconfig is run only if the md has changed since genconfig was last run;
  1262. # but the file insn-config.h is touched only when its contents actually change.
  1263.  
  1264. # Each of the other insn-* files is handled by a similar pair of rules.
  1265.  
  1266. # This causes an anomaly in the results of make -n
  1267. # because insn-* is older than stamp-*
  1268. # and thus make -n thinks that insn-* will be updated
  1269. # and force recompilation of things that depend on it.
  1270. # We use move-if-change precisely to avoid such recompilation.
  1271. # But there is no way to teach make -n that it will be avoided.
  1272.  
  1273. # Each of the insn-*.[ch] rules has a semicolon at the end,
  1274. # for otherwise the system Make on SunOS 4.1 never tries
  1275. # to recompile insn-*.o.  To avoid problems and extra noise from
  1276. # versions of make which don't like empty commands (nothing after the
  1277. # trailing `;'), we call true for each.
  1278.  
  1279. insn-config.h: stamp-config ; @true
  1280. stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
  1281.     ./genconfig $(md_file) > tmp-config.h
  1282.     $(srcdir)/move-if-change tmp-config.h insn-config.h
  1283.     touch stamp-config
  1284.  
  1285. insn-flags.h: stamp-flags ; @true
  1286. stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
  1287.     ./genflags $(md_file) > tmp-flags.h
  1288.     $(srcdir)/move-if-change tmp-flags.h insn-flags.h
  1289.     touch stamp-flags
  1290.  
  1291. insn-codes.h: stamp-codes ; @true
  1292. stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
  1293.     ./gencodes $(md_file) > tmp-codes.h
  1294.     $(srcdir)/move-if-change tmp-codes.h insn-codes.h
  1295.     touch stamp-codes
  1296.  
  1297. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
  1298.   insn-config.h insn-flags.h insn-codes.h
  1299.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
  1300.  
  1301. insn-emit.c: stamp-emit ; @true
  1302. stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
  1303.     ./genemit $(md_file) > tmp-emit.c
  1304.     $(srcdir)/move-if-change tmp-emit.c insn-emit.c
  1305.     touch stamp-emit
  1306.  
  1307. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
  1308.   real.h output.h flags.h
  1309.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
  1310.  
  1311. insn-recog.c: stamp-recog ; @true
  1312. stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
  1313.     ./genrecog $(md_file) > tmp-recog.c
  1314.     $(srcdir)/move-if-change tmp-recog.c insn-recog.c
  1315.     touch stamp-recog
  1316.  
  1317. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  1318.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  1319.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
  1320.  
  1321. insn-opinit.c: stamp-opinit ; @true
  1322. stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
  1323.     ./genopinit $(md_file) > tmp-opinit.c
  1324.     $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
  1325.     touch stamp-opinit
  1326.  
  1327. insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
  1328.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
  1329.  
  1330. insn-extract.c: stamp-extract ; @true
  1331. stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
  1332.     ./genextract $(md_file) > tmp-extract.c
  1333.     $(srcdir)/move-if-change tmp-extract.c insn-extract.c
  1334.     touch stamp-extract
  1335.  
  1336. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
  1337.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
  1338.  
  1339. insn-peep.c: stamp-peep ; @true
  1340. stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
  1341.     ./genpeep $(md_file) > tmp-peep.c
  1342.     $(srcdir)/move-if-change tmp-peep.c insn-peep.c
  1343.     touch stamp-peep
  1344.  
  1345. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  1346.      insn-attr.h insn-config.h
  1347.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
  1348.  
  1349. insn-attr.h: stamp-attr ; @true
  1350. stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
  1351.     ./genattr $(md_file) > tmp-attr.h
  1352.     $(srcdir)/move-if-change tmp-attr.h insn-attr.h
  1353.     touch stamp-attr
  1354.  
  1355. insn-attrtab.c: stamp-attrtab ; @true
  1356. stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
  1357.     if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file);    \
  1358.     then                    \
  1359.       echo Using $(PREMADE_ATTRTAB);    \
  1360.       cp $(PREMADE_ATTRTAB) tmp-attrtab.c;    \
  1361.     else                    \
  1362.       ./genattrtab $(md_file) > tmp-attrtab.c;    \
  1363.     fi
  1364.     $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
  1365.     touch stamp-attrtab
  1366.  
  1367. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  1368.     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
  1369.     insn-codes.h
  1370.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
  1371.  
  1372. insn-output.c: stamp-output ; @true
  1373. stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
  1374.     ./genoutput $(md_file) > tmp-output.c
  1375.     $(srcdir)/move-if-change tmp-output.c insn-output.c
  1376.     touch stamp-output
  1377.  
  1378. # Compile the programs that generate insn-* from the machine description.
  1379. # They are compiled with $(HOST_CC), and associated libraries,
  1380. # since they need to run on this machine
  1381. # even if GCC is being compiled to run on some other machine.
  1382.  
  1383. # $(CONFIG_H) is omitted from the deps of the gen*.o
  1384. # because these programs don't really depend on anything 
  1385. # about the target machine.  They do depend on config.h itself,
  1386. # since that describes the host machine.
  1387.  
  1388. # Pass the md file through cpp if the target requests it.
  1389. $(MD_FILE): $(MD_DEPS)
  1390.     rm -f $@
  1391.     $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
  1392.     mv tmp-$@ $@
  1393.  
  1394. genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
  1395.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1396.       genconfig.o $(HOST_RTL) $(HOST_LIBS)
  1397.  
  1398. genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
  1399.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
  1400.  
  1401. genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
  1402.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1403.      genflags.o $(HOST_RTL) $(HOST_LIBS)
  1404.  
  1405. genflags.o : genflags.c $(RTL_H) $(build_xm_file)
  1406.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
  1407.  
  1408. gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
  1409.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1410.      gencodes.o $(HOST_RTL) $(HOST_LIBS)
  1411.  
  1412. gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
  1413.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
  1414.  
  1415. genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1416.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1417.      genemit.o $(HOST_RTL) $(HOST_LIBS)
  1418.  
  1419. genemit.o : genemit.c $(RTL_H) $(build_xm_file)
  1420.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
  1421.  
  1422. genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1423.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1424.      genopinit.o $(HOST_RTL) $(HOST_LIBS)
  1425.  
  1426. genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
  1427.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
  1428.  
  1429. genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
  1430.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1431.      genrecog.o $(HOST_RTL) $(HOST_LIBS)
  1432.  
  1433. genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
  1434.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
  1435.  
  1436. genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
  1437.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1438.      genextract.o $(HOST_RTL) $(HOST_LIBS)
  1439.  
  1440. genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
  1441.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
  1442.  
  1443. genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
  1444.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1445.      genpeep.o $(HOST_RTL) $(HOST_LIBS)
  1446.  
  1447. genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
  1448.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
  1449.  
  1450. genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
  1451.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1452.      genattr.o $(HOST_RTL) $(HOST_LIBS)
  1453.  
  1454. genattr.o : genattr.c $(RTL_H) $(build_xm_file)
  1455.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
  1456.  
  1457. genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
  1458.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1459.      genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
  1460.  
  1461. genattrtab.o : genattrtab.c $(RTL_H)  $(build_xm_file) insn-config.h
  1462.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
  1463.  
  1464. genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
  1465.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1466.      genoutput.o $(HOST_RTL) $(HOST_LIBS)
  1467.  
  1468. genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
  1469.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
  1470.  
  1471. # Compile the libraries to be used by gen*.
  1472. # If we are not cross-building, gen* use the same .o's that cc1 will use,
  1473. # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
  1474. # with the rules for rtl.o, alloca.o, etc.
  1475. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
  1476.     rm -f $(HOST_PREFIX)rtl.c
  1477.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
  1478.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
  1479.  
  1480. $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
  1481.     rm -f $(HOST_PREFIX)print-rtl.c
  1482.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
  1483.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
  1484.  
  1485. $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
  1486.     rm -f $(HOST_PREFIX)rtlanal.c
  1487.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
  1488.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
  1489.  
  1490. $(HOST_PREFIX_1)alloca.o: alloca.c
  1491.     rm -f $(HOST_PREFIX)alloca.c
  1492.     cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
  1493.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
  1494.  
  1495. $(HOST_PREFIX_1)obstack.o: obstack.c
  1496.     rm -f $(HOST_PREFIX)obstack.c
  1497.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
  1498.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
  1499.  
  1500. $(HOST_PREFIX_1)malloc.o: malloc.c
  1501.     rm -f $(HOST_PREFIX)malloc.c
  1502.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
  1503.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
  1504.  
  1505. # This satisfies the dependency that we get if you cross-compile a compiler
  1506. # that does not need to compile alloca, malloc or whatever.
  1507. $(HOST_PREFIX_1): 
  1508.     touch $(HOST_PREFIX_1)
  1509.  
  1510. # Remake bytecode files.
  1511. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
  1512.  
  1513. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  1514.    bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  1515. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  1516.    bc-opcode.h bc-typecd.h bc-typecd.def
  1517.  
  1518. bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  1519.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1520.      bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  1521. bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  1522.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1523.      bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  1524. bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  1525.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1526.      bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  1527.  
  1528. $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
  1529. $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
  1530.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  1531.  
  1532. bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
  1533.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1534.        $(srcdir)/bi-parser.c
  1535. bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
  1536.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1537.        $(srcdir)/bi-lexer.c
  1538. bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
  1539.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1540.        $(srcdir)/bi-arity.c
  1541. bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
  1542.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1543.        $(srcdir)/bi-opcode.c
  1544. bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
  1545.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1546.        $(srcdir)/bi-opname.c
  1547. bi-reverse.o: bi-reverse.c bi-defs.h
  1548.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1549.        $(srcdir)/bi-reverse.c
  1550.  
  1551. bc-arity.h: stamp-bcarity ; @true
  1552. stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  1553.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  1554.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  1555.     touch stamp-bcarity
  1556.  
  1557. bc-opcode.h: stamp-bcopcode ; @true
  1558. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  1559.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  1560.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  1561.     touch stamp-bcopcode
  1562.  
  1563. bc-opname.h: stamp-bcopname ; @true
  1564. stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  1565.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  1566.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  1567.     touch stamp-bcopname
  1568.  
  1569. bytecode.mostlyclean:
  1570.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  1571.  
  1572. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  1573.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  1574.  
  1575. bytecode.maintainer-clean: bytecode.clean
  1576.     -rm -f bi-parser.c bi-parser.h
  1577.  
  1578.  
  1579. # Remake cpp and protoize.
  1580.  
  1581. # Making the preprocessor
  1582. cpp: $(CCCP)
  1583.     -rm -f cpp$(exeext)
  1584.     $(HARDLINK) $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
  1585.      || cp $(CCCP)$(exeext) cpp$(exeext)
  1586. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  1587.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
  1588.       version.o $(LIBS)
  1589. cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  1590.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
  1591. $(srcdir)/cexp.c: $(srcdir)/cexp.y
  1592.     cd $(srcdir); $(BISON) -o cexp.c cexp.y
  1593.  
  1594. cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
  1595. # The reason we use $(libdir)/g++-include rather than using libsubdir
  1596. # is for compatibility with the current version of libg++.
  1597.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1598.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1599.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1600.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1601.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1602.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1603.       -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  1604.  
  1605. cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
  1606.   version.o $(LIBDEPS)
  1607.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
  1608.       cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
  1609.  
  1610. cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
  1611.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1612.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1613.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1614.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1615.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1616.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1617.       -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
  1618.  
  1619. cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
  1620.  
  1621. cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
  1622.  
  1623. cpphash.o: cpphash.c cpplib.h cpphash.h
  1624.  
  1625. # Note for the stamp targets, we run the program `true' instead of
  1626. # having an empty command (nothing following the semicolon).
  1627.  
  1628. proto: config.status protoize unprotoize SYSCALLS.c.X
  1629.  
  1630. protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1631.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
  1632.       protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS)
  1633. protoize.o: stamp-proto ; @true
  1634.  
  1635. unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1636.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
  1637.       unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS)
  1638. unprotoize.o:    stamp-proto ; @true
  1639.  
  1640. stamp-proto: protoize.c getopt.h $(CONFIG_H)
  1641.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1642.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1643.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1644.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1645.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1646.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1647.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1648.       -DUNPROTOIZE $(srcdir)/protoize.c
  1649.     mv protoize$(objext) unprotoize$(objext)
  1650.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1651.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1652.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1653.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1654.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1655.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1656.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1657.       $(srcdir)/protoize.c
  1658.     touch stamp-proto
  1659.  
  1660. getopt.o: getopt.c getopt.h
  1661.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
  1662. getopt1.o: getopt1.c getopt.h
  1663.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
  1664.  
  1665. # This info describes the target machine, so compile with GCC just built.
  1666. SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
  1667.    stmp-int-hdrs
  1668.     -rm -f SYSCALLS.c tmp-SYSCALLS.s
  1669.     cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
  1670.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1671.       -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
  1672.     -rm -f SYSCALLS.c tmp-SYSCALLS.s
  1673.  
  1674.  
  1675. test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
  1676.     -rm -f tmp-proto.[cso]
  1677.     cp $(srcdir)/protoize.c tmp-proto.c
  1678.     chmod u+w tmp-proto.c
  1679.     ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1680.       $(CFLAGS) $(INCLUDES) \
  1681.       -DGCC_INCLUDE_DIR=0 \
  1682.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1683.       -DCROSS_INCLUDE_DIR=0 \
  1684.       -DTOOL_INCLUDE_DIR=0 \
  1685.       -DSTD_PROTO_DIR=0" tmp-proto.c
  1686.     @echo '**********' Expect 400 lines of differences.
  1687.     -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
  1688.     -wc -l tmp-proto.diff
  1689.     ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1690.       $(CFLAGS) $(INCLUDES) \
  1691.       -DGCC_INCLUDE_DIR=0 \
  1692.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1693.       -DCROSS_INCLUDE_DIR=0 \
  1694.       -DTOOL_INCLUDE_DIR=0 \
  1695.       -DSTD_PROTO_DIR=0" tmp-proto.c
  1696.     @echo Expect zero differences.
  1697.     diff $(srcdir)/protoize.c tmp-proto.c | cat
  1698.     -rm -f tmp-proto.[cs] tmp-proto$(objext)
  1699.  
  1700. # Build the include directory.  The stamp files are stmp-* rather than
  1701. # stamp-* so that mostlyclean does not force the include directory to
  1702. # be rebuilt.
  1703.  
  1704. # Build the include directory except for float.h (which depends upon
  1705. # enquire).
  1706. stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h objc-headers
  1707. # Copy in the headers provided with gcc.
  1708. # The sed command gets just the last file name component;
  1709. # this is necessary because VPATH could add a dirname.
  1710. # Using basename would be simpler, but some systems don't have it.
  1711.     objdir=`pwd`; \
  1712.     cd $(srcdir); \
  1713.     for file in $(USER_H); do \
  1714.       realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  1715.       rm -f $$objdir/include/$$realfile; \
  1716.       cp ginclude/$$realfile $$objdir/include; \
  1717.       chmod a+r $$objdir/include/$$realfile; \
  1718.     done
  1719.     rm -f include/limits.h
  1720.     cp xlimits.h include/limits.h
  1721.     chmod a+r include/limits.h
  1722. # Install the README
  1723.     rm -f include/README
  1724.     cp $(srcdir)/README-fixinc include/README
  1725.     chmod a+r include/README
  1726.     touch stmp-int-hdrs
  1727.  
  1728. # Build the complete include directory.
  1729. stmp-headers: stmp-int-hdrs gfloat.h
  1730.     rm -f include/float.h
  1731.     cp gfloat.h include/float.h
  1732.     chmod a+r include/float.h
  1733.     touch stmp-headers
  1734.  
  1735. # Build fixed copies of system files.
  1736. stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
  1737.     rm -rf include
  1738.     mkdir include
  1739.     if [ x$(FIXINCLUDES) != xMakefile.in ]; \
  1740.     then \
  1741.       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
  1742.         if [ -d $$dir ]; \
  1743.         then \
  1744.           $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
  1745.         else true; fi; \
  1746.       done; \
  1747.     else true; \
  1748.     fi
  1749.     rm -f include/syslimits.h
  1750.     if [ -f include/limits.h ]; then \
  1751.       mv include/limits.h include/syslimits.h; \
  1752.     else \
  1753.       cp $(srcdir)/gsyslimits.h include/syslimits.h; \
  1754.     fi
  1755.     chmod a+r include/syslimits.h
  1756.     touch stmp-fixinc
  1757.  
  1758. # copy objc header files into build directory
  1759. objc-headers: stmp-fixinc
  1760.     if [ -d include ]; then true; else mkdir include; fi
  1761.     if [ -d objc ]; then true; else mkdir objc; fi
  1762.     thisdir1=`pwd`; \
  1763.     srcdir1=`cd $(srcdir); pwd`; \
  1764.     cd objc; \
  1765.     $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  1766.     srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1767.     GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  1768.     GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  1769.     touch objc-headers
  1770.  
  1771. # Files related to the fixproto script.
  1772.  
  1773. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
  1774.     CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
  1775.       export CC; \
  1776.       $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
  1777.     mv tmp-deduced.h deduced.h
  1778.  
  1779. gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
  1780.     ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1781.       gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
  1782.  
  1783. gen-protos.o: gen-protos.c scan.h $(build_xm_file)
  1784.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
  1785.  
  1786. scan.o: scan.c scan.h $(build_xm_file)
  1787.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
  1788.  
  1789. xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
  1790.     cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
  1791.     mv tmp-fixtmp.c fixtmp.c
  1792.     $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
  1793.       | sed -e 's/    / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  1794.       | ./gen-protos >xsys-protos.hT
  1795.     mv xsys-protos.hT xsys-protos.h
  1796.     rm -rf fixtmp.c
  1797.  
  1798. fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
  1799.    cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
  1800.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
  1801.        scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
  1802.        cppexp.o $(HOST_LIBS)
  1803.  
  1804. fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
  1805.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
  1806.  
  1807. scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
  1808.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
  1809.  
  1810. # stmp-fixproto depends on this, not on fix-header directly.
  1811. # The idea is to make sure fix-header gets built,
  1812. # but not rerun fixproto after each stage
  1813. # just because fix-header's mtime has changed.
  1814. fixhdr.ready: fix-header
  1815.     -if [ -f fixhdr.ready ] ; then \
  1816.         true; \
  1817.     else \
  1818.         touch fixhdr.ready; \
  1819.     fi
  1820.  
  1821. # stmp-headers is to make sure fixincludes has already finished.
  1822. # The if statement is so that we don't run fixproto a second time
  1823. # if it has already been run on the files in `include'.
  1824. stmp-fixproto: fixhdr.ready fixproto stmp-headers
  1825.     @echo "Various warnings and error messages from fixproto are normal"
  1826.     -if [ -d include ] ; then true; else mkdir include; fi
  1827.     -if [ -f include/fixed ] ; then true; \
  1828.     else \
  1829.       : This line works around a 'make' bug in BSDI 1.1.; \
  1830.       FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
  1831.       $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
  1832.       touch include/fixed; \
  1833.     fi
  1834.     touch stmp-fixproto
  1835.  
  1836. # Remake the info files.
  1837.  
  1838. doc: info
  1839. info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
  1840.  
  1841. $(srcdir)/cpp.info: cpp.texi
  1842.     cd $(srcdir); $(MAKEINFO) cpp.texi
  1843.  
  1844. $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
  1845.         md.texi rtl.texi tm.texi 
  1846.     cd $(srcdir); $(MAKEINFO) gcc.texi
  1847.  
  1848. dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
  1849.  
  1850. # This works with GNU Make's default rule.
  1851. $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
  1852.         md.texi rtl.texi tm.texi 
  1853.     $(TEXI2DVI) $<
  1854.  
  1855. # This works with GNU Make's default rule.
  1856. $(srcdir)/cpp.dvi: cpp.texi
  1857.     $(TEXI2DVI) $<
  1858.  
  1859. $(srcdir)/INSTALL: install1.texi install.texi
  1860.     $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
  1861.       `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
  1862.  
  1863. # Deletion of files made during compilation.
  1864. # There are four levels of this:
  1865. #   `mostlyclean', `clean', `distclean' and `maintainer-clean'.
  1866. # `mostlyclean' is useful while working on a particular type of machine.
  1867. # It deletes most, but not all, of the files made by compilation.
  1868. # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
  1869. # `clean' deletes everything made by running `make all'.
  1870. # `distclean' also deletes the files made by config.
  1871. # `maintainer-clean' also deletes everything that could be regenerated
  1872. # automatically.  We remove as much from the language subdirectories as we can
  1873. # (less duplicated code).
  1874.  
  1875.  
  1876. mostlyclean: bytecode.mostlyclean lang.mostlyclean
  1877.     -rm -f $(STAGESTUFF)
  1878. # Clean the objc subdir if we created one.
  1879.     if [ -d objc ]; then \
  1880.       srcdir1=`cd $(srcdir); pwd`; \
  1881.       cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
  1882.     else true; fi
  1883.     -rm -f libobjc.a
  1884. # Delete the temporary source copies for cross compilation.
  1885.     -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
  1886.     -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
  1887.     -rm -f $(HOST_PREFIX_1)obstack.c 
  1888. # Delete the temp files made in the course of building libgcc.a.
  1889.     -rm -f tmplibgcc* tmpcopy xlimits.h
  1890.     for name in $(LIB1FUNCS); do rm -f $${name}.c; done
  1891. # Delete other temporary files.
  1892.     -rm -f tmp-float.h tmp-gcc.xtar.gz
  1893.     -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
  1894.     -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
  1895.     -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
  1896.     -rm -f tmp-fixtmp.c xsys-protos.hT
  1897. # Delete the stamp files.
  1898.     -rm -f stamp-* tmp-*
  1899.     -rm -f */stamp-* */tmp-*
  1900. # Delete debugging dump files.
  1901.     -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  1902.     -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
  1903.     -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
  1904.     -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
  1905.     -rm -f */*.sched2 */*.stack
  1906. # Delete some files made during installation.
  1907.     -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
  1908.     -rm -f collect collect2 mips-tfile mips-tdump alloca.s
  1909. # Delete files generated for fixproto
  1910.     -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
  1911.       gen-protos fixproto.list fixtmp.* fixhdr.ready
  1912. # Delete unwanted output files from TeX.
  1913.     -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
  1914.     -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
  1915. # Delete sorted indices we don't actually use.
  1916.     -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
  1917. # Delete core dumps.
  1918.     -rm -f core */core
  1919.  
  1920. # Delete all files made by compilation
  1921. # that don't exist in the distribution.
  1922. clean: mostlyclean bytecode.clean lang.clean
  1923. # It may not be quite desirable to delete unprotoize.c here,
  1924. # but the spec for `make clean' requires it.
  1925. # Using unprotoize.c is not quite right in the first place, 
  1926. # but what better way is there?
  1927.     -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
  1928.     -rm -f libgcc1.null $(LIB2FUNCS_EXTRA)
  1929.     -rm -f *.dvi
  1930.     -rm -f */*.dvi
  1931.     -if [ -f md.pre-cpp ]; then \
  1932.       rm -f md ; \
  1933.     fi
  1934. # Delete the include directory.
  1935.     -rm -rf stmp-* include objc-headers
  1936.     -rm -f */stmp-*
  1937. # Delete files used by the "multilib" facility (including libgcc subdirs).
  1938.     -rm -f multilib.h tmpmultilib*
  1939.     -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
  1940.       rm -rf $(MULTILIB_DIRNAMES); \
  1941.     else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
  1942.       rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
  1943.     fi ; fi
  1944.  
  1945. # Delete all files that users would normally create
  1946. # while building and installing GCC.
  1947. distclean: clean bytecode.distclean lang.distclean
  1948.     -rm -f tm.h config.h tconfig.h hconfig.h md
  1949.     -rm -f config.status config.run
  1950.     -rm -f Makefile specs.h options.h *.oaux
  1951.     -rm -fr stage1 stage2 stage3 stage4
  1952.     -rm -f */stage1 */stage2 */stage3 */stage4 */include
  1953.     -rm -f cp-parse.output
  1954.     -rm -f objc-parse.output
  1955.     -rm -f c-parse.output
  1956.     -rm -f *.asm
  1957.  
  1958. # Delete anything likely to be found in the source directory
  1959. # that shouldn't be in the distribution.
  1960. extraclean: distclean lang.extraclean
  1961.     -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
  1962.     -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
  1963.     -rm -f config/*/=* config/*/"#"* config/*/*~*
  1964.     -rm -f config/*/*.orig config/*/*.rej
  1965.     -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
  1966.     -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
  1967.     -rm -f *lose config/*lose config/*/*lose
  1968.     -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
  1969.     -rm -f */=* */"#"* */*~*
  1970.     -rm -f */patch* */*.orig */*.rej
  1971.     -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
  1972.     -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
  1973.     -rm -f */*lose */*.s */*.s[0-9] */*.i
  1974.  
  1975. # Get rid of every file that's generated from some other file.
  1976. # Most of these files ARE PRESENT in the GCC distribution.
  1977. maintainer-clean: distclean bytecode.maintainer-clean lang.maintainer-clean
  1978.     -rm -f c-parse.y c-gperf.h objc-parse.y
  1979.     -rm -f objc-parse.c objc-parse.output
  1980.     -rm -f c-parse.c c-parse.h c-parse.output
  1981.     -rm -f cexp.c cexp.output TAGS 
  1982.     -rm -f cpp.info* cpp.??s cpp.*aux
  1983.     -rm -f gcc.info* gcc.??s gcc.*aux
  1984.  
  1985. # Entry points `install' and `uninstall'.
  1986. # Also use `install-collect2' to install collect2 when the config files don't.
  1987.  
  1988. # The semicolon is to prevent the install.sh -> install default rule
  1989. # from doing anything.  Having it run true helps avoid problems and
  1990. # noise from versions of make which don't like to have null commands.
  1991. install: $(INSTALL_TARGET) ; @true
  1992.  
  1993. # Copy the compiler files into directories where they will be run.
  1994. # Install the driver last so that the window when things are
  1995. # broken is small.
  1996. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
  1997.     install-libobjc install-man install-info lang.install-normal install-driver
  1998.  
  1999. # Do nothing while making gcc with a cross-compiler. The person who
  2000. # makes gcc for the target machine has to know how to put a complete
  2001. # gcc together by hand.
  2002. install-build: force
  2003.     @echo You have to install gcc on your target machine by hand.
  2004.  
  2005. # Run this on the target machine
  2006. # to finish installation of cross compiler.
  2007. install-cross-rest: install-float-h-cross
  2008.  
  2009. # Install float.h for cross compiler.
  2010. # Run this on the target machine!
  2011. install-float-h-cross: install-dir
  2012. #    if [ -f enquire ] ; then true; else false; fi
  2013. # Note: don't use -.  We should fail right away if enquire was not made.
  2014.     ./enquire -f > $(tmpdir)/float.h
  2015.     -rm -f $(libsubdir)/include/float.h
  2016.     $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
  2017.     -rm -f $(tmpdir)/float.h
  2018.     chmod a-x $(libsubdir)/include/float.h
  2019.  
  2020. # Create the installation directory.
  2021. install-dir:
  2022.     -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
  2023.     -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
  2024. # This dir isn't currently searched by cpp.
  2025. #    -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
  2026.     -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi
  2027.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi
  2028.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
  2029.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
  2030.     -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
  2031.     -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
  2032.     -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
  2033.     -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
  2034. # We don't use mkdir -p to create the parents of mandir,
  2035. # because some systems don't support it.
  2036. # Instead, we use this technique to create the immediate parent of mandir.
  2037.     -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
  2038.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
  2039.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
  2040.  
  2041. # Install the compiler executables built during cross compilation.
  2042. install-common: native install-dir $(EXTRA_PARTS) lang.install-common
  2043.     for file in $(COMPILERS); do \
  2044.       if [ -f $$file ] ; then \
  2045.         rm -f $(libsubdir)/$$file; \
  2046.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  2047.       else true; \
  2048.       fi; \
  2049.     done
  2050.     for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
  2051.       if [ x"$$file" != x.. ]; then \
  2052.         rm -f $(libsubdir)/$$file; \
  2053.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  2054.       else true; fi; \
  2055.     done
  2056.     for file in $(EXTRA_PARTS) ..; do \
  2057.       if [ x"$$file" != x.. ]; then \
  2058.         rm -f $(libsubdir)/$$file; \
  2059.         $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
  2060.       else true; fi; \
  2061.     done
  2062. # Don't mess with specs if it doesn't exist yet.
  2063.     -if [ -f specs ] ; then \
  2064.       rm -f $(libsubdir)/specs; \
  2065.       $(INSTALL_DATA) specs $(libsubdir)/specs; \
  2066.     fi
  2067. # Install protoize if it was compiled.
  2068.     -if [ -f protoize$(exeext) ]; \
  2069.     then \
  2070.         rm -f $(bindir)/protoize$(exeext); \
  2071.         $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
  2072.         rm -f $(bindir)/unprotoize$(exeext); \
  2073.         $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
  2074.         rm -f $(libsubdir)/SYSCALLS.c.X; \
  2075.         $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
  2076.         chmod a-x $(libsubdir)/SYSCALLS.c.X; \
  2077.     fi
  2078.     -rm -f $(libsubdir)/cpp$(exeext)
  2079.     $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
  2080.  
  2081. # Install the driver program as $(target)-gcc
  2082. # and also as either gcc (if native) or $(tooldir)/bin/gcc.
  2083. install-driver: xgcc
  2084.     -if [ -f gcc-cross$(exeext) ] ; then \
  2085.       rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
  2086.       $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
  2087.       if [ -d $(tooldir)/bin/. ] ; then \
  2088.         rm -f $(tooldir)/bin/gcc$(exeext); \
  2089.         $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
  2090.       else true; fi; \
  2091.     else \
  2092.       rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
  2093.       $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
  2094.       rm -f $(bindir)/$(target)-gcc-1$(exeext); \
  2095.       $(HARDLINK) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
  2096.         > /dev/null 2>&1 \
  2097.         || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
  2098.       mv $(bindir)/$(target)-gcc-1$(exeext) $(bindir)/$(target)-gcc$(exeext); \
  2099.     fi
  2100.  
  2101. # Install the info files.
  2102. install-info: doc install-dir lang.install-info
  2103.     -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
  2104.     cd $(srcdir); for f in cpp.info* gcc.info*; \
  2105.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  2106.     -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
  2107.  
  2108. # Install the man pages.
  2109. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
  2110.     -if [ -f gcc-cross ] ; then \
  2111.       rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
  2112.       $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
  2113.       chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
  2114.     else \
  2115.       rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
  2116.       $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
  2117.       chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
  2118.     fi
  2119.     -rm -f $(mandir)/cccp$(manext)
  2120.     -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
  2121.     -chmod a-x $(mandir)/cccp$(manext)
  2122.  
  2123. # Install the library.
  2124. install-libgcc: libgcc.a install-dir
  2125.     -if [ -f libgcc.a ] ; then \
  2126.       rm -f $(libsubdir)/libgcc.a; \
  2127.       $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
  2128.       if $(RANLIB_TEST) ; then \
  2129.         (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
  2130.       chmod a-x $(libsubdir)/libgcc.a; \
  2131.     else true; fi
  2132.  
  2133. # Install multiple versions of libgcc.a.
  2134. install-multilib: stmp-multilib install-dir
  2135.     for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
  2136.       dir=`echo $$i | sed -e 's/;.*$$//'`; \
  2137.       if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
  2138.       rm -f $(libsubdir)/$${dir}/libgcc.a; \
  2139.       $(INSTALL_DATA) $${dir}/libgcc.a $(libsubdir)/$${dir}/libgcc.a; \
  2140.       if $(RANLIB_TEST); then \
  2141.         (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
  2142.       chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
  2143.     done
  2144.  
  2145. # Install the objc run time library.
  2146. install-libobjc: install-dir
  2147.     -if [ -f libobjc.a ] ; then \
  2148.       rm -f $(libsubdir)/libobjc.a; \
  2149.       $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
  2150.       if $(RANLIB_TEST) ; then \
  2151.         (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
  2152.       chmod a-x $(libsubdir)/libobjc.a; \
  2153.     else true; fi
  2154.  
  2155. # Install all the header files built in the include subdirectory.
  2156. install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
  2157. # Fix symlinks to absolute paths in the installed include directory to
  2158. # point to the installed directory, not the build directory.
  2159.     -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
  2160.     if [ $$? -eq 0 ]; then \
  2161.       dir=`cd include; pwd`; \
  2162.       for i in $$files; do \
  2163.         dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
  2164.         if expr "$$dest" : "$$dir.*" > /dev/null; then \
  2165.           rm -f $(libsubdir)/include/$$i; \
  2166.           $(SYMLINK) `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  2167.         fi; \
  2168.       done; \
  2169.     fi
  2170.  
  2171. # Create or recreate the gcc private include file directory.
  2172. install-include-dir: install-dir
  2173.     -rm -rf $(libsubdir)/include
  2174.     mkdir $(libsubdir)/include
  2175.     -chmod a+rx $(libsubdir)/include
  2176.  
  2177. # Install the include directory using tar.
  2178. install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
  2179.     (cd include; \
  2180.      tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
  2181. # /bin/sh on some systems returns the status of the first tar,
  2182. # and that can lose with GNU tar which always writes a full block.
  2183. # So use `exit 0' to ignore its exit status.
  2184.  
  2185. # Install the include directory using cpio.
  2186. install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
  2187.     (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
  2188.  
  2189. # Install the include directory using simple recursive copy.
  2190. install-headers-cp: stmp-headers install-include-dir
  2191.     cd include; cp -r . $(libsubdir)/include
  2192.  
  2193. # Put assert.h where it won't override GNU libc's assert.h.
  2194. # It goes in a dir that is searched after GNU libc's headers;
  2195. # thus, the following conditionals are no longer needed.
  2196. # But it's not worth deleting them now.
  2197. ## Don't replace the assert.h already there if it is not from GCC.
  2198. ## This code would be simpler if it tested for -f ... && ! grep ...
  2199. ## but supposedly the ! operator is missing in sh on some systems.
  2200. install-assert-h: assert.h install-dir
  2201.     if [ -f $(assertdir)/assert.h ]; \
  2202.     then \
  2203.       if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
  2204.         then \
  2205.         rm -f $(assertdir)/assert.h; \
  2206.         $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  2207.         chmod a-x $(assertdir)/assert.h; \
  2208.       else true; \
  2209.       fi; \
  2210.     else \
  2211.       rm -f $(assertdir)/assert.h; \
  2212.       $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  2213.       chmod a-x $(assertdir)/assert.h; \
  2214.     fi
  2215.  
  2216. # Use this target to install the program `collect2' under the name `ld'.
  2217. install-collect2: collect2 install-dir
  2218.     $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
  2219. # Install the driver program as $(libsubdir)/gcc for collect2.
  2220.     $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
  2221.  
  2222. # Cancel installation by deleting the installed files.
  2223. uninstall: lang.uninstall
  2224.     -rm -rf $(libsubdir)
  2225.     -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
  2226.     -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
  2227.     -rm -rf $(bindir)/protoize$(exeext)
  2228.     -rm -rf $(bindir)/unprotoize$(exeext)
  2229.     -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
  2230.     -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
  2231.     -rm -rf $(mandir)/cccp$(manext)
  2232.     -rm -rf $(mandir)/protoize$(manext)
  2233.     -rm -rf $(mandir)/unprotoize$(manext)
  2234.  
  2235. # These exist for maintenance purposes.
  2236.  
  2237. # Update the tags table.
  2238. TAGS: force
  2239.     cd $(srcdir);                            \
  2240.     mkdir temp;                            \
  2241.     mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp;        \
  2242.     etags *.y *.h *.c;                        \
  2243.     mv temp/* .;                            \
  2244.     rmdir temp
  2245.  
  2246. # Create the distribution tar file.
  2247. #dist: gcc-$(version).tar.gz
  2248. dist: gcc.xtar.gz
  2249.  
  2250. gcc.xtar.gz: gcc.xtar
  2251.     gzip --best < gcc.xtar > tmp-gcc.xtar.gz
  2252.     mv tmp-gcc.xtar.gz gcc.xtar.gz
  2253.  
  2254. #gcc-$(version).tar.gz: gcc-$(version).tar
  2255. #    gzip < gcc-$(version).tar > gcc-$(version).tar.gz
  2256.  
  2257. #gcc-$(version).tar:
  2258. gcc.xtar: distdir
  2259. # Make the distribution.
  2260.     tar -chf gcc.xtar gcc-$(version)
  2261.  
  2262. # This target exists to do the initial work before the language specific
  2263. # stuff gets done.
  2264. distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
  2265.   $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
  2266.   $(srcdir)/cexp.c
  2267.     @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
  2268.     then true; \
  2269.     else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
  2270.     fi
  2271. # Update the version number in README
  2272.     awk '$$1 " " $$2 " " $$3 == "This directory contains" \
  2273.         { $$6 = version; print $$0 } \
  2274.          $$1 " " $$2 " " $$3 != "This directory contains"' \
  2275.       version=$(version) README > tmp.README
  2276.     mv tmp.README README
  2277.     -rm -rf gcc-$(version) tmp    
  2278. # Put all the files in a temporary subdirectory
  2279. # which has the name that we want to have in the tar file.
  2280.     mkdir tmp
  2281.     mkdir tmp/config
  2282.     mkdir tmp/ginclude
  2283.     mkdir tmp/objc
  2284.     for file in *[0-9a-zA-Z+]; do \
  2285.       $(HARDLINK) $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  2286.     done
  2287.     cd config; \
  2288.     for file in *[0-9a-zA-Z+]; do \
  2289.       if test -d $$file && test "$$file" != RCS; then \
  2290.         mkdir ../tmp/config/$$file; \
  2291.         cd $$file; \
  2292.         for subfile in *[0-9a-zA-Z+]; do \
  2293.           $(HARDLINK) $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  2294.           || cp $$subfile ../../tmp/config/$$file; \
  2295.         done; \
  2296.         cd ..; \
  2297.       else \
  2298.         $(HARDLINK) $$file ../tmp/config >/dev/null 2>&1 \
  2299.         || cp $$file ../tmp/config; \
  2300.       fi; \
  2301.     done
  2302.     cd ginclude; \
  2303.     for file in *[0-9a-zA-Z+]; do \
  2304.       $(HARDLINK) $$file ../tmp/ginclude >/dev/null 2>&1 \
  2305.        || cp $$file ../tmp/ginclude; \
  2306.     done
  2307.     cd objc; \
  2308.     for file in *[0-9a-zA-Z+]; do \
  2309.       $(HARDLINK) $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  2310.     done
  2311.     $(HARDLINK) .gdbinit tmp
  2312.  
  2313. # Finish making `distdir', after the languages have done their thing.
  2314. distdir-finish:
  2315.     mv tmp gcc-$(version)
  2316. # Get rid of everything we don't want in the distribution.  We'd want
  2317. # this to use Makefile.in, but it doesn't have the `lang.foo' targets
  2318. # expanded.
  2319.     cd gcc-$(version); make extraclean
  2320.  
  2321. distdir: distdir-start lang.distdir distdir-finish
  2322.  
  2323. # make diff oldversion=M.N 
  2324. # creates a diff file between an older distribution and this one.
  2325. # The -P option assumes this is GNU diff.
  2326. diff:
  2327.     diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
  2328.       -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
  2329.       -x TAGS \
  2330.       -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
  2331.       -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
  2332.       $(LANG_DIFF_EXCLUDES) \
  2333.       gcc-$(oldversion) gcc-$(version) > diffs
  2334.  
  2335. bootstrap: force
  2336. # Only build the C compiler for stage1, because that is the only one that
  2337. # we can guarantee will build with the native compiler, and also it is the
  2338. # only thing useful for building stage2.
  2339.     $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES=c
  2340.     $(MAKE) stage1
  2341. # This used to define ALLOCA as empty, but that would lead to bad results
  2342. # for a subsequent `make install' since that would not have ALLOCA empty.
  2343. # To prevent `make install' from compiling alloca.o and then relinking cc1
  2344. # because alloca.o is newer, we permit these recursive makes to compile
  2345. # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  2346.     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  2347.     $(MAKE) stage2
  2348.     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  2349.  
  2350. bootstrap2: force
  2351.     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  2352.     $(MAKE) stage2
  2353.     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  2354.  
  2355. bootstrap3: force
  2356.     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  2357.  
  2358. # Compare the object files in the current directory with those in the
  2359. # stage2 directory.
  2360.  
  2361. # ./ avoids bug in some versions of tail.
  2362. compare: force
  2363.     for file in *$(objext); do \
  2364.       tail +16c ./$$file > tmp-foo1; \
  2365.       tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
  2366.         && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
  2367.     done
  2368.     for dir in tmp-foo $(SUBDIRS); do \
  2369.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2370.         for file in $$dir/*$(objext); do \
  2371.           tail +16c ./$$file > tmp-foo1; \
  2372.           tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
  2373.             && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
  2374.         done; \
  2375.       fi; \
  2376.     done
  2377.     -rm -f tmp-foo*
  2378.  
  2379. # Similar, but compare with stage3 directory
  2380. compare3: force
  2381.     for file in *$(objext); do \
  2382.       tail +16c ./$$file > tmp-foo1; \
  2383.       tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
  2384.         && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
  2385.     done
  2386.     for dir in tmp-foo $(SUBDIRS); do \
  2387.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2388.         for file in $$dir/*$(objext); do \
  2389.           tail +16c ./$$file > tmp-foo1; \
  2390.           tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
  2391.             && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
  2392.         done; \
  2393.       fi; \
  2394.     done
  2395.     -rm -f tmp-foo*
  2396.  
  2397. # Compare the object files in the current directory with those in the
  2398. # stage2 directory.  Use gnu cmp (diffutils v2.4 or later) to avoid
  2399. # running tail and the overhead of twice copying each object file.
  2400.  
  2401. gnucompare: force
  2402.     for file in *$(objext); do \
  2403.       cmp --ignore-initial=16 $$file stage2/$$file || true ; \
  2404.     done
  2405.     for dir in tmp-foo $(SUBDIRS); do \
  2406.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2407.         for file in $$dir/*.o; do \
  2408.           cmp --ignore-initial=16 $$file stage2/$$file || true ; \
  2409.         done; \
  2410.       fi; \
  2411.     done
  2412.  
  2413. # Similar, but compare with stage3 directory
  2414. gnucompare3: force
  2415.     for file in *$(objext); do \
  2416.       cmp --ignore-initial=16 $$file stage3/$$file || true ; \
  2417.     done
  2418.     for dir in tmp-foo $(SUBDIRS); do \
  2419.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2420.         for file in $$dir/*$(objext); do \
  2421.           cmp --ignore-initial=16 $$file stage3/$$file || true ; \
  2422.         done; \
  2423.       fi; \
  2424.     done
  2425.  
  2426. # Copy the object files from a particular stage into a subdirectory.
  2427. stage1-start:
  2428.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2429.     -for dir in . $(SUBDIRS) ; \
  2430.      do \
  2431.        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi; \
  2432.      done
  2433.     -mv $(STAGESTUFF) stage1
  2434. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2435. # dir will work properly.
  2436.     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
  2437.     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
  2438.     -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
  2439.     -rm -f stage1/libgcc.a
  2440.     -cp libgcc.a stage1
  2441.     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  2442. stage1: force stage1-start lang.stage1
  2443.  
  2444. stage2-start:
  2445.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2446.     -for dir in . $(SUBDIRS) ; \
  2447.      do \
  2448.        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi; \
  2449.      done
  2450.     -mv $(STAGESTUFF) stage2
  2451. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2452. # dir will work properly.
  2453.     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
  2454.     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
  2455.     -if [ -f collect-ld ] ; then $(SYMLINK) ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
  2456.     -rm -f stage2/libgcc.a
  2457.     -cp libgcc.a stage2
  2458.     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  2459. stage2: force stage2-start lang.stage2
  2460.  
  2461. stage3-start:
  2462.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2463.     -for dir in . $(SUBDIRS) ; \
  2464.      do \
  2465.        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi; \
  2466.      done
  2467.     -mv $(STAGESTUFF) stage3
  2468. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2469. # dir will work properly.
  2470.     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
  2471.     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
  2472.     -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
  2473.     -rm -f stage3/libgcc.a
  2474.     -cp libgcc.a stage3
  2475.     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  2476. stage3: force stage3-start lang.stage3
  2477.  
  2478. stage4-start:
  2479.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2480.     -for dir in . $(SUBDIRS) ; \
  2481.      do \
  2482.        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi; \
  2483.      done
  2484.     -mv $(STAGESTUFF) stage4
  2485. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2486. # dir will work properly.
  2487.     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
  2488.     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
  2489.     -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
  2490.     -rm -f stage4/libgcc.a
  2491.     -cp libgcc.a stage4
  2492.     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
  2493. stage4: force stage4-start lang.stage4
  2494.  
  2495. # Copy just the executable files from a particular stage into a subdirectory,
  2496. # and delete the object files.  Use this if you're just verifying a version
  2497. # that is pretty sure to work, and you are short of disk space.
  2498. risky-stage1: stage1
  2499.     - make clean
  2500.  
  2501. risky-stage2: stage2
  2502.     -make clean
  2503.  
  2504. risky-stage3: stage3
  2505.     -make clean
  2506.  
  2507. risky-stage4: stage4
  2508.     -make clean
  2509.  
  2510. #In GNU Make, ignore whether `stage*' exists.
  2511. .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
  2512. .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
  2513.  
  2514. force:
  2515.